//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __CFIELDINFO_H__
#define __CFIELDINFO_H__

#include "refutil.h"

class CFieldInfo : public IFieldInfo
{
public:
    CARAPI_(PInterface) Probe(REIID riid);
    CARAPI_(UInt32) AddRef();
    CARAPI_(UInt32) Release();
    CARAPI Aggregate(AggregateType type, PInterface pObj);
    CARAPI GetDomain(PInterface *ppObj);

    CARAPI GetName(
        /* [out] */ AStringBuf * pName);

    CARAPI GetTypeInfo(
        /* [out] */ IDataTypeInfo ** ppTypeInfo);

    CFieldInfo(
        /* [in] */ IStructInfo * pStructInfo,
        /* [in] */ AString name,
        /* [in] */ IDataTypeInfo *pTypeInfo);

    virtual ~CFieldInfo();

private:
    IStructInfo    *m_pStructInfo;
    AString        m_asName;
    IDataTypeInfo  *m_pTypeInfo;

    Interlocked m_cRef;
};

#endif // __CFIELDINFO_H__
